package com.wangzhen.springcloud.eureka.service.provider;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@RestController
@SpringBootApplication
@EnableDiscoveryClient
public class ServiceProviderApplication {

    @GetMapping("/hello")
    public Map<Object, Object> hello(HttpServletRequest request) {
        request.getSession();
        Map<Object, Object> result = new HashMap<>();
        result.put("code", 0);
        return result;
    }

    public static void main(String[] args) {
        SpringApplication.run(ServiceProviderApplication.class);
    }
}
